// ==UserScript==
// @name         城运大屏
// @namespace    none
// @version      0.8
// @description  CSS修改脚本
// @author       Rainbow
// @match        *://172.20.41.60:8080/metrotrans/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    console.log('Rainbow script Of Chengyun')
    try {
        clearTimeout(timeJob1)
    } catch (error) {
        //do nothing
    }
    var timeJob1
    timeJob1 = setTimeout(() => {
        let wrapper = document.querySelector("#ttt");
        let map = document.querySelector("#map");
        let fxBackground = document.querySelector("body > div.fx_background");
        let watchStationBody = document.querySelector("body");
        watchStationBody.style.backgroundColor = '#060A12';
        resetCss(wrapper,'38.6em','height');
        resetCss(map,'38.6em','height');
        resetCss(fxBackground,'95em','height')
		let leftElement = document.querySelector('body > div > div.LS_left');
		let centerElement = document.querySelector('body > div > div.LS_center');
		resetCss(leftElement,'7.40rem','left');
		resetCss(centerElement,'27.62rem','left');
    }, 1000);
    function resetCss(elem,param,styleAttr)
    {
        try {
            if(undefined != elem && null != elem)
            {
                elem.style[styleAttr] = param;
            }
        } catch (error) {
            //do nothing
        }
    }
})();